import request from '@/utils/request'

// 查询生产流程单列表
export function tPrdProcess(data) {
  return request({
    url: '/tPrdProcess/queryProcessList',
    method: 'post',
    data
  })
}
// 查询生产流程单详情
export function queryProcessDetails(params) {
  return request({
    url: '/tPrdProcess/queryProcessDetails',
    method: 'get',
    params
  })
}
// 获取组别
export function queryWorkshopGroupList(data) {
  return request({
    url: '/tWorkshopGroup/queryWorkshopGroupList',
    method: 'post',
    data
  })
}
// 获取工序
export function tWorkshopGroupDetails(data) {
  return request({
    url: '/tWorkshopGroupDetails/queryWorkshopGroupDetailList',
    method: 'post',
    data
  })
}
// 修改生产流程单
export function updateProcess(data) {
  return request({
    url: '/tPrdProcess/updateProcess',
    method: 'put',
    data
  })
}
// 删除生产流程单
export function processDelete(data) {
  return request({
    url: '/tPrdProcess/processDelete',
    method: 'put',
    data
  })
}
// 反提交生产流程单
export function processAuSubmit(data) {
  return request({
    url: '/tPrdProcess/processAuSubmit',
    method: 'put',
    data
  })
}
// 提交生产流程单
export function processSubmit(data) {
  return request({
    url: '/tPrdProcess/processSubmit',
    method: 'put',
    data
  })
}
// 反审核生产流程单
export function processUnAudit(data) {
  return request({
    url: '/tPrdProcess/processUnAudit',
    method: 'put',
    data
  })
}
// 审核生产流程单
export function processAudit(data) {
  return request({
    url: '/tPrdProcess/processAudit',
    method: 'put',
    data
  })
}
// 查询报工单列表
export function queryWorkReportList(data) {
  return request({
    url: '/tPrdWorkreport/queryWorkReportList',
    method: 'post',
    data
  })
}
// 查询报工单-扫码
export function scanCodeInsertWorkReport(data) {
  return request({
    url: '/tPrdWorkreport/scanCodeInsertWorkReport',
    method: 'post',
    data
  })
}
// 流程单下推工艺单
export function insertWorkReport(data) {
  return request({
    url: '/tPrdWorkreport/insertWorkReport',
    method: 'post',
    data
  })
}
// 查询工艺单详情
export function queryWorkReportDetails(params) {
  return request({
    url: '/tPrdWorkreport/queryWorkReportDetails',
    method: 'get',
    params
  })
}
// 修改工艺单
export function updateWorkReport(data) {
  return request({
    url: '/tPrdWorkreport/updateWorkReport',
    method: 'put',
    data
  })
}
// 删除工艺单
export function workReportDelete(data) {
  return request({
    url: '/tPrdWorkreport/workReportDelete',
    method: 'put',
    data
  })
}
// 反提交工艺单
export function workReportAuSubmit(data) {
  return request({
    url: '/tPrdWorkreport/workReportAuSubmit',
    method: 'put',
    data
  })
}
// 提交工艺单
export function workReportSubmit(data) {
  return request({
    url: '/tPrdWorkreport/workReportSubmit',
    method: 'put',
    data
  })
}
// 反审核工艺单
export function workReportUnAudit(data) {
  return request({
    url: '/tPrdWorkreport/workReportUnAudit',
    method: 'put',
    data
  })
}
// 审核工艺单
export function workReportAudit(data) {
  return request({
    url: '/tPrdWorkreport/workReportAudit',
    method: 'put',
    data
  })
}
